home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / T-Z / VideoStakGold.cpt / VideoStakGold / VideoStak ◊ Begin Here / stack_-1.xml < prev    next >
Extensible Markup Language  |  1988-04-27  |  12KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>329</cardCount>
  7.     <cardID>3199</cardID>
  8.     <listID>30388</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-------------------------------------------- STACK SCRIPTS CONSISTING OF OPENERS, ---- CLOSERS, IDLERS, DOMENUS & KEYTRAPS. ----------------------------------------------------------------- OPENING STUFF ---------------------On OPENSTACK-- SHOW WATCH & DECLARE GLOBALS:set cursor to 4global PK,UL,TA,BT,MW,master,titleMaster,starMasterglobal directorMaster,classMaster,labelMaster,windowglobal installBtn,lineNo,cardNo,hiButton-- RECORD PREVIOUS STATUS & ADVISE OF DELAY:go to card "Opening"put "Loading the indices. This takes a few seconds..."put the powerKeys into PKput the userLevel into ULput the textArrows into TAput the blindTyping into BThide menuBar-- ADJUST THE LOCK/UNLOCK MODALITIES:if the short name of bg btn id 153 = "Edit ON" then-- UNLOCK MODE:lock screenset the icon of bg btn id 153 to 1413unlock screenset name of bg btn id 153 to "Edit ON"set powerKeys to trueset userlevel to 1else-- LOCK MODE:lock screenset the icon of bg btn id 153 to 13262unlock screenset name of bg btn id 153 to "Edit OFF"set powerKeys to falseset userlevel to 5end if-- PUT LAST SESSION'S DATA INTO VARIABLES:put card field "Master" into masterput card field "titleMaster" into titleMasterput card field "starMaster" into starMasterput card field "directorMaster" into directorMasterput card field "classMaster" into classMasterput card field "installBtn" into installBtnput card field "labelMaster" into fld "Label"put card field "labelMaster" into labelMasterput card field "lineNo" into lineNoput card field "cardNo" into cardNoput card field "hiButton" into hiButtonsend mouseUp to bkgnd btn hiButtonput fld "Window" into window-- WARM UP OPENING CARDS:lock screenset lockmessages to truego to card "Credits"go to card cardNoif labelMaster ‚↠empty or ¬¨labelMaster ‚↠return thenput labelMaster into fld "Label"end ifif window ‚↠empty then put window into fld "Window"put item 2 of the abbrev date into field "Date"go to card "Opening"-- GO THROUGH OPENING SEQUENCE (LOCKS STILL ON!):if cardNo < "3" then put "3" into cardNoset cursor to 4go to card "Credits"play TVstartunlock screen with visual dissolve fastput emptyhide msgwait 15 tickslock screengo to card cardNoplay drawerunlock screen with visual dissolve fastset lockmessages to falseEnd OPENSTACK-------------------- MORE OPENING --------------------On OPENCARD-- DECLARE GLOBALS:global window,labelMaster-- FILL IN THOSE CONTAINERS IN NEED OF NEW DATA:if window ‚↠empty thenput window into field "Window"end ifif labelmaster ‚↠empty thenput labelMaster into field "Label"end ifput item 2 of the abbrev date into field "Date"unlock screen with visual dissolve fastEnd OPENCARD------------------------- TRAPPING HANDLERS -------------------------On IDLE-- DECLARE GLOBALS:global SEEKING,listOscrolls,master,hiTapeButtonglobal hiButton,lineNo-- DO THE EDIT THING:if the optionKey is down and ¬¨the commandKey is down thenif the short name of bg btn id 153 = "Edit OFF" thenpass idleend ifsend mouseUp to bg btn id 153exit idleend if-- CHECK INDEX; MAKE SURE NOT EMPTY:if fld "Window" = empty thenif master ‚↠empty thensend mouseUp to bg btn hiButtonend ifpass idleend if-- CHECK POWERKEYSif the powerKeys is true and ¬¨the visible of message window is false thenput InKey() into trapCharelseexit idleend if-- TRAPPING RETURNif trapChar = return thenif the visible of bg btn "Sort" is true thensend mouseUp to bg btn "Sort"exit idleend ifglobal hiButton,findItset cursor to 4if hiTapeButton is empty thensend mouseUp to bkgnd btn id 132exit idleelsesend mouseUp to bkgnd btn hiTapeButtonexit idleend ifend if-- TRAPPING ENTER:if chartonum(trapChar) = 3 thenif the short name of bg btn id 153 = "Edit ON" thensend mouseUp to bg btn id 153end ifif the tool is "browse tool"then choose button toolelse if the tool is "button tool"then choose field toolelse choose browse toolexit idleend if-- TRAPPING LEFT ARROWS:if chartonum(trapChar) = 28 thensend mouseUp to bg btn "Prev"exit idleend if-- TRAPPING RIGHT ARROWSif chartonum(trapChar) = 29 thensend mouseUp to bg btn "Next"exit idleend if-- IF CLASS INDEX IS SHOWING GET OUT:if hiButton = 33 then exit idle-- TRAPPING UP ARROWSif chartonum(trapChar) = 30 thensend mouseUp to bkgnd btn "up"exit idleend if-- TRAPPING DOWN ARROWSif chartonum(trapChar) = 31 thensend mouseUp to bkgnd btn "down"pass idleend ifif chartonum(trapChar) ‚â• 97 and ¬¨   -- LOWER CASEcharToNum(trapChar) ‚⧠122 then      -- ALPHAS-- FIND OUT LINE NUMBER OF MASTER THAT TRAPCHAR IS ON:put char 1 to offset("‚àÇ" & trapchar,master) of master ¬¨into firstLinesput the number of lines in firstLines into lineNo-- POSITION THE TRAPCHAR LINE + 11lock screenput line lineNo to lineNo + 11 of master into ¬¨field "window"unlock screen with visual dissolve fastput empty into trapCharexit idleend ifEnd IDLE--------------------- MORE TRAPPING ---------------------On MOUSEDOWN-- CHECKING TO SEE IF AN INDEXED FIELD-- WAS OPENED. IF SO, SEND CLOSE TO-- ACTIVATE INDEX ADJUSTMENT.global fieldIsOpenif fieldIsOpen is empty then pass mouseDownsend closeField to fld fieldIsOpenput empty into fieldIsOpenpass mouseDownEnd MOUSEDOWN--------------------- MORE TRAPPING ---------------------On ARROWKEY whichArrow-- DECLARE GLOBALS:global hiButton-- TRAP RIGHT ARROW:if whichArrow = "right" thensend mouseUp to bg btn "Next"exit arrowKeyend if-- TRAP LEFT ARROW:if whichArrow = "left" thensend mouseUp to bg btn "Prev"exit arrowkeyend if-- TRAP UP ARROW:if whichArrow = "up" thensend mouseUp to bkgnd btn "up"end if-- TRAP DOWN ARROW:if whichArrow = "down" thensend mouseUp to bkgnd btn "down"end ifEnd ARROWKEY--------------------- MORE TRAPPING ---------------------On DOMENU whichItem-- DECLARE GLOBALS:global nuCard,tempUL,tempPK,killCard-- TRAP THE FOUR MAJOR NAVIGATORSif whichItem = "FIRST" thenif the shiftKey is down then-- ONLY WAY TO GET TO REAL FIRST CARD!go to first cardexit doMenuend iflock screengo to card 3  -- FIRST DATA CARD!unlock screen with visual dissolve fastexit doMenuend ifif whichItem = "PREV" thenif the number of this card is 3 thengo last  -- SKIPS FIRST TWO CARDSelsego prevend ifexit doMenuend ifif whichItem = "NEXT" thenif the number of this card = ¬¨the number of cards thengo to card 3  -- SKIPS FIRST TWO CARDSelsego nextend ifexit doMenuend ifif whichItem = "LAST" thengo lastexit doMenuend if-- TRAP NEW CARD MENUITEM:if whichItem = "New Card" thenif nuCard = 0 or nuCard is empty thenanswer "Recommend using the NEW button on the VCR."exit doMenuend ifend if-- TRAP DELETE CARD MENUITEM:if whichItem = "Delete Card" thenif killCard = 0 or killCard is empty thenanswer "Recommend using the KILL button on the VCR."exit doMenuend ifend if-- TRAP CUT CARD MENUITEM:if whichItem = "Cut Card" thenanswer "No can do. Cutting cards messes up the index."exit doMenuend if-- TRAP COPY CARD MENUITEM:if whichItem = "Copy Card" thenanswer "Copying cards can mess up the index."pass doMenuend if-- TRAP PASTE CARD MENUITEM:if whichItem = "Paste Card" thenanswer "This card won't be indexed."pass doMenuend if-- TRAP NEW STACK MENUITEM:if whichItem = "New Stack..." then-- GET THE NAME OF THE NEW VIDEOSTAK:ask "What is the name of your new VideoStak?" with ¬¨"VideoStak ‚óä Mine"if IT is empty then exit doMenu-- ESTABLISH SOURCE/DESTINATION PATHNAME:set cursor to 4put it into newNameput the long name of this stack into levelNamedelete char 1 to 7 of levelNamerepeat with i = the number of chars in levelName down to 1if char i of levelName = ":" then exit repeatdelete char i of levelNameend repeatput levelName & "VideoStak ‚óä Don't Open 2" into sourceFileput levelName & newName into destinationFile-- THE GUY DE PICCIOTTO COPY FILE XCMD:copyfile sourceFile,destinationFileput the result into errorCodeif errorCode = -2 then answer ¬¨"Syntax error!"if errorCode = -1 then answer ¬¨"Not enough memory to copy!"if errorCode =  1 then answer ¬¨"Can't find VideoStak ‚óä Don't Open 2!"if errorCode =  2 then answer ¬¨"Can't create your new VideoStak file!"if errorCode =  4 then answer ¬¨"Error reading VideoStak ‚óä Don't Open 2!"if errorCode =  5 then answer ¬¨"Error writing your new VideoStak file!"if errorCode =  3 thenanswer newName && "already exists!" with ¬¨"Copy Over" or "New Name" or "Cancel"if IT = "Cancel" then exit doMenuif IT = "New Name" then doMenu "New Stack..."if IT = "Copy Over" thenset cursor to 4copyfile sourceFile,destinationFile,oput the result into errorCodeif errorCode = -2 then answer ¬¨"Syntax error!"if errorCode = -1 then answer ¬¨"Not enough memory to copy!"if errorCode =  1 then answer ¬¨"Can't find VideoStak ‚óä Don't Open 2!"if errorCode =  2 then answer ¬¨"Can't create your new VideoStak file!"if errorCode =  4 then answer ¬¨"Error reading VideoStak ‚óä Don't Open 2!"if errorCode =  5 then answer ¬¨"Error writing your new VideoStak file!"go to destinationFileexit doMenuend ifend if-- GO TO NEW VIDEOSTAK:go to destinationFileexit doMenuend if-- PASS THE DOMENU OR GET LOCKED OUT:pass doMenuEnd DOMENU--------------------- MORE TRAPPING ---------------------On ENTERKEY-- TRAPPING ENTERKEY AS A TOOL TOGGLER:if the tool is "browse tool"then choose button toolelse if the tool is "button tool"then choose field toolelse choose browse toolEnd ENTERKEY--------------------- CLOSING STUFF ---------------------On CLOSECARD-- DECLARE GLOBALS:global window,add2index,labelMaster-- MEMORIZE THE WINDOW FIELD & THEN DELETE:put field "window" into windowput field "Label" into labelMasterlock screenput empty into field "window"put empty into field "Label"End CLOSECARD-------------------- MORE CLOSING --------------------On CLOSESTACK-- DECLARE GLOBALS:global PK,UL,TA,BT,MW,cardNo,lineNo,master,hiButtonglobal hiTapeButton,window,installBtn,titleMasterglobal starMaster,directorMaster,labelMaster-- IF CLOSING SEQUENCE IS APPROPRIATE, DO IT:if the short name of this card ‚↠"Opening" then-- GET DATA NEEDED TO RESUME WHERE LEFT OFF:set cursor to 4put the number of this card into cardNo-- PUT CARDS INTO RAM SO RUN FAST-- IN THE UNLOCKED CLOSING:set lockmessages to truego to card "Credits"go to card "Opening"go to card cardNo-- CLEAN OUT THE LAST CARD VIEWED:put empty into fld "Window"put empty into fld "Label"-- START UNLOCKED CLOSING:go to card "Credits"unlock screen with visual dissolve fastput empty into fld "Window"put empty into fld "Label"play drawerwait 20 tickslock screengo to card "Opening"unlock screen with visual dissolve fastplay TVStartput empty into fld "Window"put empty into fld "Label"set lockmessages to falseend if-- PUT VITAL VARIABLES INTO FIELDS:put cardNo into card field "cardNo"put lineNo into card field "lineNo"put master into card field "master"put titleMaster into card field "titleMaster"put starMaster into card field "starMaster"put directorMaster into card field "directorMaster"put installBtn into card field "installBtn"put labelMaster into card field "labelMaster"put hiButton into card field "hiButton"-- PUT STUFF BACK THE WAY YOU FOUND IT:set the userlevel to ULset the powerKeys to PKset the textArrows to TAset the blindTyping to BT-- COMPACTION:if the freeSize of this stack/the size of this stack > .2 thenanswer "Want to compact the stack?" with "Yes" or "No"if it = "Yes" thengo to this carddomenu "Compact Stack"end ifend if-- THE EFFECT TO USE ON THE WAY OUT:visual dissolve fastEnd CLOSESTACK</